Optimal. Leaf size=14 \[ -\frac {\tanh ^{-1}(\cos (a+b x))}{2 b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 14, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {4372, 3855}
\begin {gather*} -\frac {\tanh ^{-1}(\cos (a+b x))}{2 b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3855
Rule 4372
Rubi steps
\begin {align*} \int \cos (a+b x) \csc (2 a+2 b x) \, dx &=\frac {1}{2} \int \csc (a+b x) \, dx\\ &=-\frac {\tanh ^{-1}(\cos (a+b x))}{2 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(42\) vs. \(2(14)=28\).
time = 0.02, size = 42, normalized size = 3.00 \begin {gather*} \frac {1}{2} \left (-\frac {\log \left (\cos \left (\frac {a}{2}+\frac {b x}{2}\right )\right )}{b}+\frac {\log \left (\sin \left (\frac {a}{2}+\frac {b x}{2}\right )\right )}{b}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.14, size = 22, normalized size = 1.57
method | result | size |
default | \(\frac {\ln \left (\csc \left (x b +a \right )-\cot \left (x b +a \right )\right )}{2 b}\) | \(22\) |
risch | \(-\frac {\ln \left ({\mathrm e}^{i \left (x b +a \right )}+1\right )}{2 b}+\frac {\ln \left ({\mathrm e}^{i \left (x b +a \right )}-1\right )}{2 b}\) | \(36\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 84 vs.
\(2 (12) = 24\).
time = 0.29, size = 84, normalized size = 6.00 \begin {gather*} -\frac {\log \left (\cos \left (b x\right )^{2} + 2 \, \cos \left (b x\right ) \cos \left (a\right ) + \cos \left (a\right )^{2} + \sin \left (b x\right )^{2} - 2 \, \sin \left (b x\right ) \sin \left (a\right ) + \sin \left (a\right )^{2}\right ) - \log \left (\cos \left (b x\right )^{2} - 2 \, \cos \left (b x\right ) \cos \left (a\right ) + \cos \left (a\right )^{2} + \sin \left (b x\right )^{2} + 2 \, \sin \left (b x\right ) \sin \left (a\right ) + \sin \left (a\right )^{2}\right )}{4 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 30 vs.
\(2 (12) = 24\).
time = 2.64, size = 30, normalized size = 2.14 \begin {gather*} -\frac {\log \left (\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2}\right ) - \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2}\right )}{4 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: HeuristicGCDFailed} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 28 vs.
\(2 (12) = 24\).
time = 0.43, size = 28, normalized size = 2.00 \begin {gather*} -\frac {\log \left (\cos \left (b x + a\right ) + 1\right ) - \log \left (-\cos \left (b x + a\right ) + 1\right )}{4 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.02, size = 12, normalized size = 0.86 \begin {gather*} -\frac {\mathrm {atanh}\left (\cos \left (a+b\,x\right )\right )}{2\,b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________